from PyQt4.QtCore import *
from PyQt4.QtGui import *

from view3d import *
import axes
import wirebox
import transform

class MainWindow(QMainWindow):
    """
    MainWindow is the controller/owner of the objview application.
    """

    def __init__(self):
        QMainWindow.__init__(self)
        self.v3d = View3d()
        self.cam = InteractiveCamera()
        self.v3d.setCamera(self.cam)
        self.axes = axes.Axes()
        self.v3d.addItem(self.axes)
        self.box = wirebox.WireBox(transform.translate([0.5,0.5,0.5]))
        self.v3d.addItem(self.box)
        self.setCentralWidget(self.v3d)

    def closeEvent(self, event):
        event.accept()

